<include file="public@head" />
</head>

<body>
    <div class="layui-fluid wrap" id="component-tabs">
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">管理员</div>
                    <div class="layui-card-body">
                        <div class="layui-tab">
                            <ul class="layui-tab-title">
                                <li><a href="{:url('user/index')}">{:lang('ADMIN_USER_INDEX')}</a></li>
                                <li class="layui-this"><a href="{:url('user/add')}">{:lang('ADMIN_USER_ADD')}</a></li>
                            </ul>
                            <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show">
                                    <form class="layui-form js-ajax-form" action="{:url('user/addpost')}" method="post">
                                        <div class="layui-form-item">
                                            <label for="input-name" class="layui-form-label"><span style="color:#ff5722;">*</span>{:lang('USERNAME')}</label>
                                            <div class="layui-input-block">
                                                <input type="text" class="layui-input" id="input-user_login" name="user_login">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label for="input-remark" class="layui-form-label"><span style="color:#ff5722;">*</span>{:lang('PASSWORD')}</label>
                                            <div class="layui-input-block">
                                                <input type="text" class="layui-input" id="input-user_pass" name="user_pass" placeholder="******">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label"><span style="color:#ff5722;">*</span>{:lang('EMAIL')}</label>
                                            <div class="layui-input-block">
                                                <input type="text" class="layui-input" id="input-user_email" name="user_email">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label"><span style="color:#ff5722;">*</span>{:lang('ROLE')}</label>
                                            <div class="layui-input-block">
                                                <style type="text/css">
                                                .layui-form-checkbox span {
                                                    height: 26px;
                                                }
                                                </style>
                                                <foreach name="roles" item="vo">
                                                    <input class="layui-input" lay-skin="primary" value="{$vo.id}" type="checkbox" name="role_id[]" title="{$vo.name}" <if condition="cmf_get_current_admin_id() neq 1 && $vo['id'] eq 1">disabled="true"</if>>
                                                </foreach>
                                            </div>
                                        </div>
                                        <div class="layui-form-item layui-layout-admin">
                                            <div class="layui-input-block">
                                                <div class="layui-footer" style="left: 0;">
                                                    <button type="submit" class="layui-btn js-ajax-submit">{:lang('ADD')}</button>
                                                    <a class="layui-btn layui-btn-primary" href="{:url('user/index')}">返回</a>
                                                </div>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <include file="public@footer" />
</body>

</html>